﻿Imports DAO
Imports DTO
Public Class PhieuKhamBenhBUS
    Public Function INSERT(ByVal mabenhnhan As Long, ByVal dudoan As String, ByVal trieuchung As String) As Integer
        Dim pkb_DTO As New PhieuKhamBenhDTO()
        Dim pkb_DAO As New PhieuKhamBenhDAO()
        If dudoan.Length < 1 Then
            Return 2
        End If
        If trieuchung.Length < 1 Then
            Return 2

        End If
        Try
            pkb_DTO.MaBenhNhan = mabenhnhan
            pkb_DTO.DuDoanLoaiBenh = dudoan
            pkb_DTO.TrieuChung = trieuchung
        Catch ex As Exception
            Return 2
        End Try

        Dim kq As Integer
        kq = pkb_DAO.INSERT(pkb_DTO)
        Return kq
    End Function
End Class
